try:
    text = input('Input something:')
except EOFError:
    print('WTF?')
except KeyboardInterrupt:
    print('cancelled')
else:
    print('you entered {0}'.format(text))
